#include <stdio.h>
#include <stdlib.h>
#include <arpa/inet.h>

int main(){
    char ip[] = "192.168.0.1";
    int num1 = 0;
    unsigned char *p1 = (char *)&num1;

    inet_pton(AF_INET, ip, &num1);
    printf("%d\n", num1);

    printf("%d.%d.%d.%d\n", *p1, *(p1+1), *(p1+2), *(p1+3));
}